﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using ModuleExternalProducersAdd.ViewModels;

namespace ModuleExternalProducersAdd.Commands
{
    public class SaveNewProducerCommand : ICommand
    {
        private IProducerAddViewModel m_producerAddViewModel;

        public SaveNewProducerCommand(IProducerAddViewModel viewModel)
        {
            m_producerAddViewModel = viewModel;
        }

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public void Execute(object parameter)
        {
            m_producerAddViewModel.SaveNewProducer();
        }


        public event EventHandler CanExecuteChanged;
    }
}
